<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>我的卡卷</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="/css/mui.min.css">
		<link rel="stylesheet" href="/css/style.css">
	</head>
	<body>
		<header id="header" class="mui-bar mui-bar-nav">
			<button id="headerBacker" class="mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
				<span class="mui-icon mui-icon-left-nav"></span>
			</button>
			<h1 class="mui-title">我的卡卷</h1>
		</header>
		<div class="mui-content">
			<div class="mui-content-padded">
				<div id="segmentedControl" class="mui-segmented-control">
					<a class="mui-control-item mui-active" href="#item1">未使用卡卷</a>
					<a class="mui-control-item" href="#item2">已使用卡卷</a>
					<a class="mui-control-item" href="#item3">已过期卡卷</a>
				</div>
				<ul id="item1" class="mui-control-content mui-table-view mui-table-view-striped mui-table-view-condensed mui-active">
					@if (isset($coupons[1]) && count($coupons[1]) > 0)
					@foreach($coupons[1] as $coupon)
						<li class="mui-table-view-cell">
							<div class="mui-table">
								<div class="mui-table-cell mui-col-xs-12">
									{{--<a href="#delete">--}}
									<a href="/my/coupon_order_create?coupon_code={{$coupon->code}}&&coupon_name={{$coupon->name}}&&coupon_id={{$coupon->id}}">
										<h5 class="mui-ellipsis">{{$coupon->name}}</h5>
										<p>有效期：{{$coupon->valid_dates}}</p>
									</a>
								</div>
							</div>
						</li>
					@endforeach
					@else
					<p class="title" style="text-align: center;color: #ccc; margin: 40px;">没有数据</p>
					@endif
				</ul>
				<div id="item2" class="mui-control-content mui-table-view mui-table-view-striped mui-table-view-condensed">
					@if (isset($coupons[2]) && count($coupons[2]) > 0)
					@foreach($coupons[2] as $coupon)
							<li class="mui-table-view-cell">
								<div class="mui-table">
									<div class="mui-table-cell mui-col-xs-12">
										{{--<a href="#delete">--}}
										<a href="javascript:void(0);">
											<h5 class="mui-ellipsis">{{$coupon->name}}</h5>
											<p>有效期：{{$coupon->valid_dates}}</p>
										</a>
									</div>
								</div>
							</li>
					@endforeach
					@else
					<p class="title" style="text-align: center;color: #ccc; margin: 40px;">没有数据</p>
					@endif
				</div>
				<ul id="item3" class="mui-control-content mui-table-view mui-table-view-striped mui-table-view-condensed">
					@if (isset($coupons[3]) && count($coupons[3]) > 0)
					@foreach($coupons[3] as $coupon)
							<li class="mui-table-view-cell">
								<div class="mui-table">
									<div class="mui-table-cell mui-col-xs-12">
										{{--<a href="#delete">--}}
										<a href="javascript:void(0);">
											<h5 class="mui-ellipsis">{{$coupon->name}}</h5>
											<p>有效期：{{$coupon->valid_dates}}</p>
										</a>
									</div>
								</div>
							</li>
					@endforeach
					@else
					<p class="title" style="text-align: center;color: #ccc; margin: 40px;">没有数据</p>
					@endif
				</ul>
				<div class="mui-content-padded footer">
					<p>
						--- 已经到底喽 ---
					</p>
				</div>
			</div>
		</div>
		<div id="delete" class="mui-popover mui-popover-action mui-popover-bottom">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="/my/coupon_order_create">立即使用</a>
				</li>
			</ul>
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a href="#delete"><b>取消</b></a>
				</li>
			</ul>
		</div>
		<script src="/js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init({
				swipeBack: true
			});

		</script>
	</body>
</html>
